<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<link rel="stylesheet" type="text/css" href="js/webuploader-0.1.5/webuploader.css" />

<script type="text/javascript">
		$(function(){
	      	 $(".itab ul").idTabs();//tab点击事件 
	      	/*$("[alt]").click(function(){
				var tab = $(this).attr("href");
				if(tab=="#tab5"){
					$("#direction_span").show();
				}else{
					$("#direction_span").hide();
				}
			}); */
			s2init();
			readerMsg();
			var roomType = "${requestScope.roomType}"
			if(roomType=="玄关"){
				$("#sibi").hide();
				$("#ding").show();
				$("#dimian").show();
				$("a[alt='顶']").click();
			}else if(roomType=="平台"){
				$("#sibi").show();
				$("#ding").hide();
				$("#dimian").show();
				$("a[alt='顶']").click();
			}else{
				$("#sibi").show();
				$("#ding").show();
				$("#dimian").show();
			}
			
			//默认选中
		});
		
		function readerMsg(){
			//读取添加状态
			var msg="${requestScope.msg}";
			if(msg=="succez"){
				layer.msg('添加成功！');
			}else if(msg=="error"){
				layer.msg('添加失败！');
			}
		}
		function s2init(){
			//初始化select2插件
			var $s2=$("#id_label_multiple").select2({minimumResultsForSearch: -1});
			var data=["东","南","西","北"];
			for(var i=0;i<data.length;i++){
				$("#id_label_multiple").append("<option value="+data[i]+">"+data[i]+"</option>");
			}
			$s2.val("<%=request.getParameter("direction")%>").trigger("change");
			//增加change事件
			$("#id_label_multiple").on("change",function(){
				openAddCheck($(this).val());
			});
		}
		//打开页面页面
		function openAddCheck(t){
			var url="project/roomInfo/openAddCheck?direction="+t;
			location.replace(url)
		}
		
</script>
<style type="text/css">
.style_l {
	float: left;
	padding: 0 80px 20px 0px;
}

fieldset {
	border-width: 0;
	padding: .35em .625em .75em;
	margin: 0 2px;
	border: 1px solid #c0c0c0;
}
#id_label_multiple{
	width:100px;
}
</style>
</style>
</head>
<body>
	<div class="tabbable tabs-left"> 
			<!-- Nav tabs -->
		  <ul class="nav nav-tabs" role="tablist">
		    <li  class="active"><a href="#tab2-11" data-toggle="tab">四壁</a></li>
		    <li ><a href="#tab2-22" data-toggle="tab">顶</a></li>
		    <li ><a href="#tab2-23" data-toggle="tab">地面</a></li>
		  </ul>
		
		  <!-- Tab panes -->
		  <div class="tab-content">
		  	<!-- 四壁start -->
		    <div class="tab-pane active" id="tab2-11">
		    	<%@include file="decorationWalls-add.jsp"%>
		    </div>
		    <!-- 四壁end -->
			<!-- 顶start -->
		    <div class="tab-pane" id="tab2-22">
		    	<%@include file="decorationProof-add.jsp"%>
		    </div>
		    <!-- 顶end -->
		    <!-- 地面start -->
		    <div class="tab-pane" id="tab2-23">
		    	<%@include file="decorationLand-add.jsp"%>
		    </div>
		    <!-- 地面end -->
		 </div>	    
   </div>
</body>


